import httpRequest from "@/utils/httpRequest";

/**
 * 获取所有用户标签
 * @returns {AxiosPromise}
 */
export const getUserTags = () => {
    return httpRequest({
        url: httpRequest.adornUrl('/manage/wxUserTags/list'),
        method: 'get',
    })
}
/**
 * 获取用户信息列表
 * @param params
 * @returns {AxiosPromise}
 */
export const getUserList = (params) => {
    return httpRequest({
        url: httpRequest.adornUrl('/manage/wxUser/list'),
        method: 'get',
        params: httpRequest.adornParams(params)
    })
}
/**
 * 根据openids群发消息
 * @param params
 * @returns {AxiosPromise}
 */
export const sendMassTextByOpenid = (params) => {
    return httpRequest({
        url: httpRequest.adornUrl('/massSendMsg/massSendByOpenid'),
        method: 'get',
        params: httpRequest.adornParams(params)
    })
}
/**
 * 根据用户标签群发消息
 * @param params
 * @returns {*}
 */
export const sendMassTextByTag = (params) => {
    return httpRequest({
        url:httpRequest.adornUrl('/massSendMsg/massSendByTagId'),
        methods:'get',
        params:httpRequest.adornParams(params)
    })
}
/**
 * 回复客服消息
 * @param params
 * @returns {AxiosPromise}
 */
export const sendServiceMsg = (params) => {
    return httpRequest({
        url: httpRequest.adornUrl(`/serviceMsg/sendServiceMsg`),
        method: 'post',
        data: params
    })
}